
attribute vec3		va_Tangent1;
attribute vec3		va_Tangent2;

uniform vec3		viewOrigin;			// Passed in automatically

varying vec3		viewVector;
varying vec2		bumpTexCoord;


void main (void){

	vec3		viewVec;

	// Position invariant
	gl_Position = ftransform();

	// Compute the view vector in tangent space
	viewVec = viewOrigin - gl_Vertex.xyz;

	viewVector.x = dot(viewVec, va_Tangent1);
	viewVector.y = dot(viewVec, va_Tangent2);
	viewVector.z = dot(viewVec, gl_Normal);

	// Copy the bump map texcoord
	bumpTexCoord = gl_MultiTexCoord0.st;
}
